package com.sixth.statistics.service.impl;

import com.sixth.core.entity.OrderChargeItem;
import com.sixth.core.vo.R;
import com.sixth.statistics.mapper.OrderChargeItemMapper;
import com.sixth.statistics.service.OrderChargeItemService;
import com.sixth.statistics.vo.OrderChargeItemVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: six-hospital-system
 * @description:
 * @author: 朱永奇
 * @create: 2024-08-21 10:58
 **/
@Service
public class OrderChargeItemImpl implements OrderChargeItemService {
    @Autowired
    private OrderChargeItemMapper orderChargeItemMapper;
    /**
     * 获取总收入
     * @param orderChargeItemVo
     * @return
     */
    @Override
    public R<List<OrderChargeItem>> selectAll(OrderChargeItemVo orderChargeItemVo) {
        List<OrderChargeItem> chargeItems = orderChargeItemMapper.selectListOrder(orderChargeItemVo);
        return R.ok(chargeItems);
    }
    /**
     * 获取收入详情
     * @param orderChargeItemVo
     * @return
     */
    @Override
    public R<List<OrderChargeItem>> selectAllOrder(OrderChargeItemVo orderChargeItemVo) {
        List<OrderChargeItem> chargeItems = orderChargeItemMapper.selectListOrderItem(orderChargeItemVo);
        return R.ok(chargeItems);
    }
}
